package sms.ui;

import sms.dao.UserDao;
import sms.entry.User;
import java.util.Scanner;

public class DengLu {
    public static void show() {
        Scanner sc = new Scanner(System.in);
        System.out.println("******************登录***********************");
        System.out.println("请输入用户名：");
        String userName = sc.next();
        System.out.println("请输入密码：");
        String password = sc.next();
        //验证用户密码
        UserDao userDao = new UserDao();
        User user = userDao.findForDengLu(userName, password);
        if (user != null){
            ZhuYe.show();
        }else{
            show();
        }

    }
}
